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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000000;
    min-height: 100vh;
    padding: 20px;
    color: #e8e8e8;
}

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

header {
    text-align: left;
    color: #ffffff;
    margin-bottom: 35px;
    padding: 20px 0;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header p {
    font-size: 0.95rem;
    color: #8a8f98;
    font-weight: 400;
}

.scanner-section {
    background: rgba(26, 31, 58, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(74, 95, 138, 0.2);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin-bottom: 25px;
    text-align: center;
}

.permission-status {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

.permission-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

#permissionText {
    color: #c8d0d8;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.permission-help {
    background: rgba(74, 95, 138, 0.2);
    border: 1px solid rgba(74, 95, 138, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.permission-help h3 {
    color: #ff6b6b;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.permission-help p {
    color: #c8d0d8;
    margin-bottom: 15px;
    line-height: 1.6;
}

.permission-help ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.permission-help ul li {
    color: #c8d0d8;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(42, 47, 74, 0.4);
    border-radius: 8px;
    border-left: 3px solid #5a7fbb;
    line-height: 1.5;
}

.permission-help ul li strong {
    color: #7a9fcc;
}

#reader {
    max-width: 100%;
    margin: 0 auto 20px;
    border-radius: 10px;
    overflow: hidden;
}

.btn {
    padding: 12px 28px;
    font-size: 0.95rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    margin: 5px;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, #4a6fa5 0%, #5a7fbb 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 111, 165, 0.5);
    background: linear-gradient(135deg, #5a7fbb 0%, #6a8fcb 100%);
}

.btn-secondary {
    background: rgba(58, 66, 86, 0.8);
    color: #e8e8e8;
    border: 1px solid rgba(74, 95, 138, 0.3);
}

.btn-secondary:hover {
    background: rgba(68, 76, 96, 0.9);
    transform: translateY(-2px);
    border-color: rgba(74, 95, 138, 0.5);
}

.btn-link {
    background: linear-gradient(135deg, #4a9d6f 0%, #5aad7f 100%);
    color: #ffffff;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(74, 157, 111, 0.3);
}

.btn-link:hover {
    background: linear-gradient(135deg, #5aad7f 0%, #6abd8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 157, 111, 0.5);
}

.result-section, .history-section {
    background: rgba(26, 31, 58, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(74, 95, 138, 0.2);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin-bottom: 25px;
}

.result-section h2, .history-section h2 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.result-card {
    background: rgba(42, 47, 74, 0.5);
    border: 1px solid rgba(74, 95, 138, 0.15);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 20px;
}

.result-item {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(74, 95, 138, 0.2);
}

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

.result-item label {
    display: block;
    font-weight: 600;
    color: #7a8faa;
    margin-bottom: 8px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-value {
    display: block;
    color: #e8e8e8;
    font-size: 1rem;
    word-break: break-all;
    line-height: 1.5;
}

.content-box {
    background: rgba(20, 24, 42, 0.6);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(74, 95, 138, 0.2);
    max-height: 200px;
    overflow-y: auto;
}

#urlActions {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(74, 95, 138, 0.3);
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    background: rgba(42, 47, 74, 0.4);
    border: 1px solid rgba(74, 95, 138, 0.2);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 12px;
    border-left: 3px solid #5a7fbb;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(42, 47, 74, 0.6);
    border-color: rgba(74, 95, 138, 0.4);
    transform: translateX(4px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-item-type {
    font-weight: 600;
    color: #7a9fcc;
    font-size: 0.85rem;
}

.history-item-time {
    font-size: 0.75rem;
    color: #6a7585;
}

.history-item-content {
    color: #c8d0d8;
    word-break: break-all;
    font-size: 0.9rem;
    line-height: 1.5;
}

.empty-state {
    text-align: center;
    color: #6a7585;
    font-style: italic;
    padding: 20px;
}

.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4a9d6f 0%, #5aad7f 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(74, 157, 111, 0.4);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(90, 173, 127, 0.3);
    backdrop-filter: blur(10px);
    font-weight: 600;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

    .scanner-section, .result-section, .history-section {
        padding: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 31, 58, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(74, 95, 138, 0.6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(90, 127, 187, 0.8);
}
