body {
    font-family: 'Inter', sans-serif;
    background: #f0f2f5;
    margin: 0;
    padding: 50px 10%;
    display: flex;
    justify-content: center;
}

 /*Card */
.card {
    background: #fff;
    width: 100%;
    border-radius: 2px;
    padding: 20px 35px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

 /*Heading */
h1 {
    text-align: left;
    margin-bottom: 24px;
    color: #00b894;
    font-size: 30px;
    font-weight: 600;
}

 /*Form */
form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-bottom: 30px;
}

 /*Inputs */
input, button {
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    width: 100%;
    box-sizing: border-box;
    transition: 0.3s;
}

input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.3);
}

input[readonly] {
    background: #f1f5f9;
    color: #475569;
}

 /*Button */
button {
    background: #00b894;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

button:hover {
    background: #2563eb;
}

 /*Full width button */
.full {
    grid-column: span 2;
    text-align: right;
}

 /*Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    font-size: 14px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-radius: 12px;
    overflow: hidden;
}

 /*Table header */
th {
    background: #f5f7fa;
    color: #000;
    font-weight: 600;
    padding: 14px 10px;
    text-align: center;
}

 /*Table cells */
td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

 /*Alternating row colors */
tbody tr:nth-child(even) {
    background: #f9fafb;
}

 /*Suggestion box */
.suggestions {
    position: relative;
}

.suggestion-list {
    position: absolute;
    top: 45px;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.suggestion-item {
    padding: 12px 14px;
    cursor: pointer;
    transition: 0.2s;
}

.suggestion-item:hover {
    background: #3b82f6;
    color: #fff;
}

 /*Responsive */
@media(max-width:720px){
    form { grid-template-columns: 1fr; }
    .full { text-align: center; }
}



/* Mobile Table Scroll */
@media (max-width: 768px) {

    form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;

        grid-template-areas:
            "stockInput stockInput"
            "entryRange entryRange"
            "stopLoss stopLossAmount"
            "takeProfit1 takeProfit2"
            "riskReward profitLoss"
            "addButton addButton";
    }

    /* Stock Name wrapper takes full width */
    .suggestions {
        grid-area: stockInput;
    }

    /* Entry Range full width */
    #entryRange {
        grid-area: entryRange;
    }

    /* Stop Loss + Stop Loss Amount */
    #stopLoss {
        grid-area: stopLoss;
    }
    #stopLossAmount {
        grid-area: stopLossAmount;
    }

    /* Take Profit 1 + Take Profit 2 */
    #takeProfit1 {
        grid-area: takeProfit1;
    }
    #takeProfit2 {
        grid-area: takeProfit2;
    }

    /* Risk/Reward + Profit/Loss */
    #riskReward {
        grid-area: riskReward;
    }
    #profitLoss {
        grid-area: profitLoss;
    }

    /* Add/Update button full width */
    .full-1 {
        grid-area: addButton;
        text-align: center;
    }
    
    /**/
    
    h1 {
        font-size: 24px;
    }
    .card {
        padding: 15px 20px;
        border-radius: 2px;
    }
    .table-container {
        overflow-x: auto; /* enable horizontal scroll */
        -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
    }

    table {
        width: max-content; /* allow table to be wider than container */
        min-width: 100%; /* ensure desktop still fits */
    }

    th, td {
        white-space: nowrap; /* prevent text from wrapping */
    }
}





/* Floating Menu Styles */
.floating-menu {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.menu-toggle {
  background-color: #007bff;
  color: #fff;
  font-size: 24px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.menu-toggle:hover {
  transform: rotate(90deg);
}

.menu-items {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: none;
  flex-direction: column;
  align-items: flex-end;
}

.menu-items li {
  margin: 5px 0;
}

.menu-items a {
  background-color: #007bff;
  color: #fff;
  padding: 10px 14px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
  transition: background 0.3s ease;
}

.menu-items a:hover {
  background-color: #0056b3;
}

/* Show menu when active */
.floating-menu.active .menu-items {
  display: flex;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .menu-toggle {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }
  .menu-items a {
    font-size: 13px;
    padding: 8px 12px;
  }
}
