:root {
    --color-primary: #00A9A5;
    --color-primary-dark: #008B8B;
    --color-success: #00A9A5;
    --color-warning: #FF6B35;
    --color-danger: #FF6B35;
    --color-bg: #F5F5F5;
    --color-surface: #FFFFFF;
    --color-text: #333333;
    --color-text-secondary: #666666;
    --color-border: #CCCCCC;
    --color-navy: #1A1A2E;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #00A9A5 0%, #008B8B 50%, #1A1A2E 100%);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo svg {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Search Section */
.search-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.search-card {
    background: var(--color-surface);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
}

.search-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.description {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Form */
.domain-form {
    width: 100%;
}

.input-group {
    display: flex;
    gap: 0.75rem;
}

.input-wrapper {
    position: relative;
    flex: 1;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    pointer-events: none;
    z-index: 1;
}

#domainInput {
    width: 100%;
    padding: 1rem 1rem 1rem 3.25rem;
    border: 2px solid var(--color-border);
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
    background: var(--color-surface);
}

#domainInput:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 169, 165, 0.1);
}

#domainInput::placeholder {
    color: var(--color-text-secondary);
    opacity: 0.6;
}

.btn-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #FF6B35 0%, #ff8c5a 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.btn-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
}

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

.btn-check:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    transition: transform 0.3s;
}

.btn-check:hover .btn-icon {
    transform: translateX(4px);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.3s ease-out;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-state p {
    color: white;
    font-size: 1.125rem;
    font-weight: 500;
}

/* Results Section */
.results-section {
    animation: fadeInUp 0.6s ease-out;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

.domain-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.domain-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    font-family: 'JetBrains Mono', monospace;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-close:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

/* Overall Score Card */
.overall-score-card {
    background: var(--color-surface);
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.score-content {
    flex: 1;
}

.risk-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.risk-badge.low {
    background: #d4f4f3;
    color: #008B8B;
}

.risk-badge.medium {
    background: #fff3e6;
    color: #cc5529;
}

.risk-badge.high {
    background: #ffe6e0;
    color: #cc5529;
}

.score-description {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.score-circle {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.score-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: #CCCCCC;
    stroke-width: 10;
}

.score-ring-fill {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 1s ease-out, stroke 0.3s;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#scoreNumber {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text);
    display: block;
    line-height: 1;
}

/* Ratings Grid */
.ratings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.rating-card {
    background: var(--color-surface);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s, box-shadow 0.3s;
}

.rating-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.rating-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.rating-score.success {
    background: #d4f4f3;
    color: #008B8B;
}

.rating-score.warning {
    background: #fff3e6;
    color: #cc5529;
}

.rating-score.danger {
    background: #ffe6e0;
    color: #cc5529;
}

.rating-score.unknown {
    background: #f1f5f9;
    color: #475569;
}

.rating-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.rating-status {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.rating-status.low-risk {
    background: #d4f4f3 !important;
    color: #008B8B !important;
}

.rating-status.medium-risk {
    background: #fff3e6 !important;
    color: #cc5529 !important;
}

.rating-status.high-risk {
    background: #ffe6e0 !important;
    color: #cc5529 !important;
}

.rating-description {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.record-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    padding: 0.75rem;
    background: var(--color-bg);
    border-radius: 0.5rem;
    color: var(--color-text-secondary);
    word-break: break-all;
    border: 1px solid var(--color-border);
}

.record-display:empty {
    display: none;
}

/* Technical Details */
.technical-details {
    background: var(--color-surface);
    border-radius: 1.25rem;
    padding: 0;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.details-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    transition: background 0.2s;
}

.details-toggle:hover {
    background: var(--color-bg);
}

.toggle-icon {
    transition: transform 0.3s;
    color: var(--color-text-secondary);
}

.details-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.details-content {
    padding: 0 2rem 2rem 2rem;
    border-top: 1px solid var(--color-border);
}

.details-content.hidden {
    display: none;
}

.detail-section {
    margin-top: 1.5rem;
}

.detail-section h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.detail-section code {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    padding: 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    color: var(--color-text);
    word-break: break-all;
    line-height: 1.6;
}

/* Error Section */
.error-section {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-surface);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-xl);
    animation: fadeIn 0.3s ease-out;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.error-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.error-section p {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.btn-retry {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #FF6B35 0%, #ff8c5a 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .search-card {
        padding: 1.5rem;
    }

    .input-group {
        flex-direction: column;
        gap: 1rem;
    }

    .input-wrapper {
        width: 100%;
    }

    .input-icon {
        left: 1.125rem;
        top: 50%;
        transform: translateY(-50%);
    }

    #domainInput {
        padding: 0.875rem 1rem 0.875rem 2.875rem;
        font-size: 0.9375rem;
    }

    .btn-check {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }

    .overall-score-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .ratings-grid {
        grid-template-columns: 1fr;
    }

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

    .btn-close {
        align-self: flex-end;
    }
}

/* Contact Form Section */
.contact-section {
    background: var(--color-surface);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-lg);
}

.contact-header {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-header h3 {
    font-size: 1.75rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.contact-header p {
    color: var(--color-text-secondary);
    font-size: 1rem;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.form-group label {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--color-bg);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 169, 165, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-text {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.checkbox-text a {
    color: var(--color-primary);
    text-decoration: underline;
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-submit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #FF6B35 0%, #ff8c5a 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

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

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background: #d4f4f3;
    color: #008B8B;
}

.form-message.error {
    background: #ffe6e0;
    color: #cc5529;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-section {
        padding: 1.5rem;
    }
    
    .contact-header h3 {
        font-size: 1.5rem;
    }
}
