.tool-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.hero-text {
    flex: 1;
    min-width: 260px;
}

.hero-text h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 1rem;
    margin-top: 0;
}

@media (max-width: 767px) {
    .hero-text h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.125rem);
    }
}

.geo-calculator {
    margin-top: 2rem;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.3s ease;
}

.section-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f3f4f6;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.card-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.label-main {
    flex: 1;
}

.label-symbol {
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
    margin-left: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.field-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: #111827;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
    appearance: none;
    box-sizing: border-box;
}

.field-input:focus {
    outline: none;
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.field-input::placeholder {
    color: #9ca3af;
}

.optional-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f3f4f6;
}

.optional-header {
    margin-bottom: 1.5rem;
}

.optional-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-calculate,
.btn-reset {
    flex: 1;
    min-width: 120px;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-calculate {
    background: #6366f1;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-calculate:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-calculate:active {
    transform: translateY(0);
}

.btn-reset {
    background: #ffffff;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-reset:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.results-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    color: #ffffff;
    min-height: 200px;
}

.results-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.results-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-icon svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
}

.results-title-group {
    flex: 1;
}

.results-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.results-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
}

.results-content {
    min-height: 100px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-icon svg {
    width: 100%;
    height: 100%;
    stroke: #ffffff;
}

.empty-text {
    font-size: 0.9375rem;
    opacity: 0.8;
    margin: 0;
}

.result-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-bottom: 0.5rem;
    display: block;
}

.result-item-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.result-item-formula {
    font-size: 0.8125rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    font-style: italic;
}

.sequence-output {
    margin-top: 2rem;
    animation: fadeInUp 0.4s ease-out;
}

.output-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f3f4f6;
}

.output-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.btn-copy-sequence {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6366f1;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-sequence:hover {
    background: #e5e7eb;
    color: #4f46e5;
}

.btn-copy-sequence svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.sequence-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sequence-term {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInScale 0.3s ease-out;
}

.sequence-term-index {
    opacity: 0.8;
    font-size: 0.8125rem;
}

.toast-notification {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: #10b981;
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: none;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.toast-notification.show {
    display: flex;
}

.toast-notification.error {
    background: #ef4444;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: #ffffff;
}

.toast-message {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (min-width: 1024px) {
    .calculator-container {
        grid-template-columns: 1.2fr 1fr;
    }
}

@media (max-width: 768px) {
    .section-card {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-calculate,
    .btn-reset {
        width: 100%;
    }

    .results-card {
        padding: 1.5rem;
    }

    .results-title {
        font-size: 1.25rem;
    }

    .result-item-value {
        font-size: 1.25rem;
    }

    .output-card {
        padding: 1.5rem;
    }

    .toast-notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .section-card {
        padding: 1.25rem;
    }

    .card-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .form-grid {
        gap: 1rem;
    }

    .field-input {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }

    .results-card {
        padding: 1.25rem;
    }

    .results-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .results-icon {
        width: 40px;
        height: 40px;
    }

    .results-icon svg {
        width: 20px;
        height: 20px;
    }

    .sequence-term {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
}
