/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #121212;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 30px;
}

/* Header Styles */
.header {
    width: 100%;
    background-color: #1a1a1a; /* Header background */
    padding: 20px 0;
    text-align: center;
}

.logo-container {
    display: flex;
    padding-left: 20px;
    padding-right: 100px;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    width: 75px;  /* Adjust based on your logo size */
    height: auto;
}

/* Title Styling */
.title {
    flex: 1;
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    color: #fff;  /* Make the title white */
}

/* Container for everything */
.container {
    width: 80%;
    max-width: 1200px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease-in-out;
}

/* Enhanced Form Wrapper */
.form-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    height: auto;
    position: static;
    transition: none;
}

.form-wrapper form {
    background: linear-gradient(145deg, #1e1e1e, #141414);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a2a2a;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: end;
    max-width: 900px;
    width: 90%;
}

/* Enhanced Input Styles */
input[type="text"], input[type="number"] {
    padding: 12px 16px;
    font-size: 14px;
    background: linear-gradient(145deg, #252525, #1a1a1a);
    color: #fff;
    border: 2px solid #333;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus, input[type="number"]:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
}

input[type="text"]:hover, input[type="number"]:hover {
    border-color: #4a4a4a;
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
}

/* Number Input Enhancements */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Input validation states */
input:invalid {
    border-color: #f44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

input:valid {
    border-color: #333;
}

/* Enhanced Button */
button {
    padding: 12px 24px;
    font-size: 14px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
    grid-column: span 3;
    justify-self: center;
    min-width: 150px;
}

button:hover {
    background: linear-gradient(135deg, #45a049, #388e3c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.2);
}

/* Loading state for button */
button:disabled {
    background: linear-gradient(135deg, #666, #555);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Input Labels */
.form-wrapper p {
    font-size: 12px;
    color: #b0b0b0;
    margin: 0 0 6px 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Symbol Input - Special Styling */
input[name="symbol"] {
    grid-column: span 3;
    font-size: 16px;
    padding: 16px 20px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

input[name="symbol"]::placeholder {
    color: #666;
    letter-spacing: 1px;
    font-weight: 400;
}

/* Form focus management */
.form-wrapper form:focus-within {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border-color: #4CAF50;
}

/* Input Groups for Parameters */
.input-group {
    display: flex;
    flex-direction: column;
}

/* Responsive Form Design */
@media (max-width: 768px) {
    .form-wrapper form {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 20px;
        width: 95%;
    }
    
    input[name="symbol"] {
        grid-column: span 2;
        font-size: 14px;
        padding: 14px 16px;
    }
    
    button {
        grid-column: span 2;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .form-wrapper form {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px 15px;
    }
    
    input[name="symbol"], button {
        grid-column: span 1;
    }
    
    .form-wrapper p {
        font-size: 11px;
    }
}

/* Results container appears below the input */
.results-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.results-container:not(:empty) {
    opacity: 1;
}

/* Enhanced Card Styles with Grouping and Color Coding */
.card {
    background: linear-gradient(145deg, #1e1e1e, #141414);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    width: 320px;
    padding: 0;
    text-align: left;
    transition: all 0.3s ease-in-out;
    border: 1px solid #2a2a2a;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    border-color: #4CAF50;
}

/* Card Header - Meta Information */
.card-header {
    background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
    padding: 15px 20px;
    border-bottom: 2px solid #333;
}

.card-header h3 {
    font-size: 16px;
    margin: 0;
    color: #b0b0b0;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header .dte-badge {
    background-color: #3a3a3a;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 18px;
    color: #fff;
    font-weight: bold;
    letter-spacing: 1px;
    margin-left: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18); 
    display: inline-block;       
    vertical-align: middle;
}

/* Card Body with Sections */
.card-body {
    padding: 20px;
}

/* Primary Metrics Section */
.primary-metrics {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.primary-metrics .metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.primary-metrics .metric:last-child {
    margin-bottom: 0;
}

.primary-metrics .metric-label {
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
}

.primary-metrics .metric-value {
    font-size: 18px;
    font-weight: bold;
    /* Remove static color, will be set by classes below */
    /* color: #4CAF50; */
}

/* Color for Return on Risk value based on thresholds */
.primary-metrics .metric-value.ror-danger {
    color: #f44336; /* Red for danger */
}
.primary-metrics .metric-value.ror-warning {
    color: #FF9800; /* Orange for warning */
}
.primary-metrics .metric-value.ror-success {
    color: #4CAF50; /* Green for success */
}

/* Color for Probability of Profit value based on thresholds */
.primary-metrics .metric-value.pop-danger {
    color: #f44336; /* Red for danger */
}
.primary-metrics .metric-value.pop-warning {
    color: #FF9800; /* Orange for warning */
}
.primary-metrics .metric-value.pop-success {
    color: #4CAF50; /* Green for success */
}

/* Strike Information Section */
.strike-info {
    margin-bottom: 18px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.05));
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.section-title {
    font-size: 12px;
    color: #b0b0b0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

.strike-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 0;
}

.strike-row:last-child {
    margin-bottom: 0;
}

.strike-type {
    font-size: 13px;
    color: #2196F3;
    font-weight: 600;
    min-width: 50px;
}

.strike-price {
    font-size: 15px;
    color: #fff;
    font-weight: 500;
}

.strike-premium {
    font-size: 13px;
    color: #90CAF9;
    background: rgba(33, 150, 243, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

/* Risk Metrics Section */
.risk-metrics {
    margin-bottom: 15px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 152, 0, 0.05));
    border-radius: 8px;
    border-left: 4px solid #FF9800;
}

.risk-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.risk-row:last-child {
    margin-bottom: 0;
}

.risk-label {
    font-size: 13px;
    color: #e0e0e0;
    font-weight: 500;
}

.risk-value {
    font-size: 14px;
    color: #FFB74D;
    font-weight: 600;
}

.risk-value.positive {
    color: #4CAF50;
}

.risk-value.neutral {
    color: #FFC107;
}

/* Meta Information Section */
.meta-info {
    padding: 10px;
    background: rgba(96, 96, 96, 0.1);
    border-radius: 6px;
    border-top: 1px solid #333;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
}

.meta-label {
    font-weight: 500;
}

.meta-value {
    color: #b0b0b0;
}

/* Progress Bar for Percentages */
.progress-container {
    width: 60px;
    height: 6px;
    background-color: #333;
    border-radius: 3px;
    overflow: hidden;
    margin-left: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-bar.warning {
    background: linear-gradient(90deg, #FF9800, #FFB74D);
}

.progress-bar.danger {
    background: linear-gradient(90deg, #f44336, #ef5350);
}

/* Remove form movement on results */
.container.results-displayed .form-wrapper {
    height: auto;
    margin-bottom: 30px;
}

/* Responsive Design for Cards */
@media (max-width: 768px) {
    .card {
        width: 100%;
        max-width: 350px;
        margin: 0 10px;
    }
    
    .results-container {
        flex-direction: column;
        align-items: center;
    }
    
    .primary-metrics .metric-value {
        font-size: 16px;
    }
    
    .strike-row, .risk-row {
        flex-wrap: wrap;
        gap: 5px;
    }
}

/* Animation for card appearance */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: slideInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

/* Enhanced hover effects for interactive elements */
.metric:hover .progress-bar {
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.strike-row:hover {
    background: rgba(33, 150, 243, 0.1);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.risk-row:hover {
    background: rgba(255, 152, 0, 0.1);
    border-radius: 4px;
    transition: background 0.2s ease;
}

/* Enhanced typography */
.metric-value.highlight {
    position: relative;
}

/* Better spacing for mobile */
@media (max-width: 480px) {
    .card-body {
        padding: 15px;
    }
    
    .primary-metrics, .strike-info, .risk-metrics {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .section-title {
        font-size: 11px;
    }
}
