/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f0f0;
    min-height: 100px; /* Permite janelas ultra pequenas */
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/bg-01.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.8;
    z-index: -1;
}

.main-container {
    width: 100%;
    margin: 1rem;
    max-width: 72rem;
    min-width: 100px; /* Permite larguras ultra pequenas */
    min-height: 100px; /* Permite alturas ultra pequenas */
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (min-width: 768px) {
    .main-container {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Stopwatch Section */
.stopwatch-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Watch Container */
.watch-container {
    position: relative;
    margin: clamp(0.25rem, 3vw, 2rem);
    width: min(400px, calc(100vw - 4rem));
    height: min(400px, calc(100vw - 4rem));
    max-width: 400px;
    max-height: 400px;
}

/* Watch Bands */
.watch-band-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-2rem);
    width: 10rem;
    height: 3rem;
    background: linear-gradient(to bottom, #070e18, #000000);
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.watch-band-bottom {
    position: absolute;
    bottom: 0;
    left: 50%;
    z-index: 0;
    transform: translateX(-50%) translateY(2rem);
    width: 10rem;
    height: 3rem;
    background: linear-gradient(to top, #070e18, #000000);
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Watch Case */
.watch-case {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    border-radius: 50%;
    background: linear-gradient(to bottom right, #1f2937, #111827, #000000);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Watch Bezel */
.watch-bezel {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    border-radius: 50%;
    background: linear-gradient(to bottom right, #374151, #111827);
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

/* Watch Face */
.watch-face {
    position: relative;
    width: 85%;
    height: 85%;
    border-radius: 50%;
    background: #d3d6d8;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #111827;
}

/* Progress Circle */
.progress-svg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-circle {
    transition: stroke-dashoffset 100ms linear;
}

/* Time Markers */
.marker {
    position: absolute;
    font-family: 'Fraunces Display', serif;
    font-size: clamp(0.5rem, 2.5vw, 0.85rem);
    font-weight: 700;
    color: #1f2937;
}

.marker-60 { top: 4%; left: 50%; transform: translateX(-50%); }
.marker-15 { right: 4%; top: 50%; transform: translateY(-50%); }
.marker-30 { bottom: 4%; left: 50%; transform: translateX(-50%); }
.marker-45 { left: 4%; top: 50%; transform: translateY(-50%); }

/* Center Content */
.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Recording Indicator */
.recording-indicator {
    /* margin-bottom: 0.75rem; */
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.recording-dot {
    width: .6rem;
    height: .6rem;
    background-color: #f87171;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Main Time Display */
.time-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: -0.5rem;
    margin-right: 0.3rem;
}

.time-hours, .time-minutes {
    font-size: clamp(24px, 15vw, 137px);
    font-weight: 900;
    color: #111827;
    line-height: 1;
    letter-spacing: -0.04em;
    font-family: 'Fraunces Display', serif;
}

.time-colon {
    position: absolute;
    font-size: clamp(12px, 8vw, 66px);
    font-weight: 900;
    top: 50%;
    transform: translateY(-50%) translateX(0.15rem);
    padding: 0;
    margin: 0;
    font-family: 'Fraunces Display', serif;
}

/* Status Display */
.status-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -0.5rem;
}

.seconds-ms {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #1f2937;
}

.status-text {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #6b7280;
    margin-top: 0.125rem;
}

/* Crown */
.crown {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(0.25rem);
    width: 1.5rem;
    height: 3rem;
    background: linear-gradient(to right, #374151, #4b5563);
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Controls */
.controls {
    display: flex;
    gap: 1rem;
}

.toggle-btn {
    padding: 1rem 2.5rem;
    background-color: #111827;
    border-radius: 9999px;
    color: #ffffff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.toggle-btn:hover {
    background-color: #1f2937;
    transform: scale(1.05);
}

.toggle-btn:active {
    transform: scale(0.95);
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.hidden {
    display: none;
}

/* Records Section */
.records-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 30rem;
}

.records-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #374151;
}

.records-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 700px;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.3rem;
    max-height: 70vh;
    overflow-y: auto;
}

.records-list::-webkit-scrollbar {
    width: 6px;
}

.records-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.records-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.records-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Records Footer */
.records-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.records-total-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.records-total-label strong {
    color: #111827;
    font-size: 0.875rem;
    font-weight: 700;
}

.csv-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background-color: #1f2937;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.csv-btn:hover {
    background-color: #303d4f;
    transform: scale(1.05);
}

.csv-btn:active {
    transform: scale(0.95);
}

.csv-icon {
    width: 0.875rem;
    height: 0.875rem;
}

/* Record Checkbox */
.record-check {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.3rem;
    height: 1.3rem;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.record-check:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
    transition: all 0.3s;
}

.record-check:checked {
    background: #1f2937;
    border-color: #1f2937;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
    background-size: 100%;
}

.record-item:hover .record-check,
.record-check:checked {
    opacity: 1;
}

.records-total-label.has-selection strong {
    color: #0828b7;
}

.record-item:has(.record-check:checked) {
    box-shadow: inset 0 0 0 1px #1f2937;
}

.no-records {
    /* text-align: center; */
    padding-top: 2rem;
    color: #616b7c;
    font-size: 0.875rem;
}

/* Record Item */
.record-item {
    position: relative;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: box-shadow 0.3s;
}

.record-item:hover {
    transform: scale(1.005) ;
    transition: all 0.3s;
}

.record-item:hover .delete-btn {
    background-color: rgba(239, 68, 68, 0.1);
}

.record-item:hover .delete-icon {
    opacity: 1;
}


.record-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.record-time {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    line-height: 1.2;
}

.record-date {
    font-size: 0.70rem;
    color: #374151;
    font-weight: 300;
    font-family: system-ui, -apple-system, sans-serif;
}

.delete-btn {
    width: 2rem;
    height: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.3s;
    color: #ef4444;
}

.delete-icon {
    width: 1.1rem;
    height: 1.1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Responsive Design - Tablets and smaller screens */
@media (max-width: 768px) {
    .watch-container {
        width: 320px;
        height: 320px;
        margin: 1rem;
    }

    .watch-band-top, .watch-band-bottom {
        width: 8rem;
        height: 2.4rem;
    }

    .watch-band-top {
        transform: translateX(-50%) translateY(-1.6rem);
    }

    .watch-band-bottom {
        transform: translateX(-50%) translateY(1.6rem);
    }

    .watch-bezel {
        top: 0.6rem;
        right: 0.6rem;
        bottom: 0.6rem;
        left: 0.6rem;
    }

    .watch-face {
        width: 272px;
        height: 272px;
    }

    .time-hours, .time-minutes {
        font-size: 110px;
    }

    .time-colon {
        font-size: 53px;
    }

    .marker {
        font-size: 0.75rem;
    }

    .marker-60 { top: 12px; }
    .marker-15 { right: 12px; }
    .marker-30 { bottom: 12px; }
    .marker-45 { left: 12px; }

    .crown {
        width: 1.2rem;
        height: 2.4rem;
        transform: translateY(-50%) translateX(0.2rem);
    }
}

/* Responsive Design - Mobile devices */
@media (max-width: 480px), (max-height: 450px) {
    .watch-container {
        width: 280px;
        height: 280px;
        margin: 0.5rem;
    }

    .watch-band-top, .watch-band-bottom {
        width: 7rem;
        height: 2.1rem;
    }

    .watch-band-top {
        transform: translateX(-50%) translateY(-1.4rem);
    }

    .watch-band-bottom {
        transform: translateX(-50%) translateY(1.4rem);
    }

    .watch-bezel {
        top: 0.525rem;
        right: 0.525rem;
        bottom: 0.525rem;
        left: 0.525rem;
    }

    .time-hours, .time-minutes {
        font-size: 96px;
    }

    .time-colon {
        font-size: 46px;
    }

    .controls {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        max-width: 280px;
    }

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

    .marker-60 { top: 10px; }
    .marker-15 { right: 10px; }
    .marker-30 { bottom: 10px; }
    .marker-45 { left: 10px; }

    .crown {
        width: 1.05rem;
        height: 2.1rem;
        transform: translateY(-50%) translateX(0.175rem);
    }

    .main-container {
        gap: 2rem;
        margin: 0.5rem;
    }
}

/* Domain Selector */
.domain-selector {
    flex-shrink: 0;
}

.domain-select-wrapper {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.domain-select {
    padding: 0.5rem 0.75rem;
    background-color: #e3e3e3cc;
    border: none;
    border-radius: 0.5rem;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    appearance: none;
    padding-right: 2rem;
    min-width: 7rem;
    max-width: 10rem;
}

.domain-select:hover {
    border: 1px solid #d1d5db;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
}

.domain-select:focus {
    /* outline: none; */
    border-color: #1f2937;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.add-domain-btn {
    width: 2rem;
    height: 2rem;
    background-color: #1f2937;
    border: none;
    border-radius: 0.5rem;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-domain-btn:hover {
    background-color: #303d4f;
    border-radius: 0.8;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.add-domain-btn:active {
    transform: scale(0.95);
}

.add-icon {
    width: 1rem;
    height: 1rem;
}

/* Records Header */
.records-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Record Domain Badge */
.record-domain-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.375rem;
    font-size: 0.625rem;
    font-weight: 500;
    color: #374151;
    margin-top: 0.25rem;
}

.domain-color-indicator {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Domain Context Menu - Liquid Glass Design */
.domain-context-menu {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    min-width: 12rem;
    max-width: 16rem;
    z-index: 1000;
    transform-origin: top left;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    cursor: pointer;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.context-menu-item:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.25);
}

.context-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    opacity: 0.8;
}

/* Manage Domain Button */
.manage-domain-btn {
    width: 2rem;
    height: 2rem;
    background-color: #e3e3e3cc;
    border: none;
    border-radius: 0.5rem;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.manage-domain-btn:hover {
    background-color: #f6f6f6cc;
    color: #374151;
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.manage-domain-btn:active {
    transform: scale(0.95);
}

.manage-icon {
    width: 1.1rem;
    height: 1.1rem;
}

/* Manage Domains Modal */
.manage-modal-content {
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.domain-list {
    padding: 0 1.5rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 60vh;
}

.domain-list::-webkit-scrollbar {
    width: 4px;
}

.domain-list::-webkit-scrollbar-track {
    background: transparent;
}

.domain-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

/* Domain Card */
.domain-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.domain-card:hover {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.domain-card-color {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.domain-card-info {
    flex: 1;
    min-width: 0;
}

.domain-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.domain-card-name .default-badge {
    font-size: 0.625rem;
    font-weight: 600;
    color: #a3a3a3;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.domain-card-desc {
    font-size: 0.75rem;
    color: #565d6b;
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.domain-card-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.domain-action-btn {
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s ease;
}

.domain-action-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #111827;
    transform: scale(1.1);
}

.domain-action-btn.active {
    color: #eab308;
}

.domain-action-btn.delete-action:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.domain-action-btn svg {
    width: 0.9rem;
    height: 0.9rem;
}

/* Domain Edit Form (inline) */
.domain-edit-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid #e5e5e5;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.domain-edit-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.domain-edit-form .form-input,
.domain-edit-form .form-textarea {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
}

.domain-edit-form .form-textarea {
    min-height: 2.5rem;
    max-height: 5rem;
}

.domain-edit-form .color-picker {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
}

.domain-edit-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.domain-edit-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    flex: 0;
}

.domain-list-empty {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* New Domain Modal - Liquid Glass Design */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1.5rem;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    width: 100%;
    max-width: 28rem;
    z-index: 2001;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0;
    /* margin-bottom: 1rem; */
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.close-modal-btn {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #111827;
    transform: scale(1.05);
}

.close-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Modal Form */
.modal-form {
    padding: 0 1.5rem 1.5rem;
}

.form-group {
    margin-bottom: 10%;
}

.form-group-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

.flex-1 {
    flex: 1;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
}

.color-picker-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(237, 237, 237, 0.5);
    border-radius: 0.75rem;
    color: #111827;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #d2d2d2;
    background: rgba(255, 255, 255, 0.9);
}

.form-textarea {
    resize: vertical;
    min-height: 4rem;
    max-height: 8rem;
}

/* Color Picker Liquid Glass */
.color-picker-wrapper {
    display: flex;
    align-items: center;
}

.color-picker {
    height: 2.78rem;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 0.7rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.4);
    color: #374151;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-primary {
    background-color: #1f2937;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #111827;
    transform: translateY(-1px);
}

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

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

/* Record Detail Modal */
.record-detail-body {
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.detail-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #111827;
}

.record-item {
    cursor: pointer;
}

.record-desc-indicator {
    font-size: 0.75rem;
    margin-left: 0.35rem;
}

.separator {
    color: #97a7bf;
    font-weight: 600;
}

/* Mobile Responsive for Domain Components */
@media (max-width: 480px) {
    .domain-select {
        font-size: 0.7rem;
        padding: 0.375rem 0.5rem;
        padding-right: 1.75rem;
        min-width: 5rem;
        max-width: 7rem;
    }
    
    .records-header {
        gap: 0.5rem;
    }
    
    .domain-select-wrapper {
        gap: 0.25rem;
    }
    
    .add-domain-btn,
    .manage-domain-btn {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .color-picker, .color-preview {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .manage-modal-content {
        max-height: 90vh;
    }
    
    .domain-card {
        padding: 0.75rem;
    }
    
    .domain-card-color {
        width: 2rem;
        height: 2rem;
    }
    
    .domain-edit-row {
        flex-wrap: wrap;
    }
}

/* Web Footer */
.web-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #111827;
    padding: 0.875rem 1.5rem;
    text-align: center;
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.web-footer-text {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.web-footer-link {
    color: #f59b35;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.web-footer-link:hover {
    color: #c97f35;
    text-decoration: underline;
}


