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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    /* Fallback gradient if image doesn't load */
    background-color: #0a1522;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.logo {
    height: 32px;
    width: auto;
    display: block;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 1;
}

.content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #b8d4f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.left-section {
    display: flex;
    flex-direction: column;
}

.right-section {
    display: flex;
    flex-direction: column;
}

.input-section {
    margin-bottom: 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.input-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.url-input,
.asin-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
}

.url-input::placeholder,
.asin-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.url-input:focus,
.asin-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.extract-btn,
.generate-btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.extract-btn:hover,
.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.4);
}

.extract-btn:active,
.generate-btn:active {
    transform: translateY(0);
}

.divider {
    text-align: center;
    margin: 15px 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

.clear-section {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.clear-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

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

.hidden {
    display: none !important;
}

.deep-link-section {
    margin-top: 0;
}

.section-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.link-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.link-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.85rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: 'Courier New', monospace;
    outline: none;
    transition: all 0.3s ease;
}

.link-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.copy-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: #ffffff;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.4);
}

.check-btn {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #ffffff;
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(46, 204, 113, 0.4);
}

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

.btn-icon {
    font-size: 1rem;
}

.notification {
    margin-top: 10px;
    margin-bottom: 15px;
    padding: 10px 16px;
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.5);
    border-radius: 8px;
    color: #2ecc71;
    text-align: center;
    font-size: 0.85rem;
    animation: fadeIn 0.3s ease;
}

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

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .right-section {
        order: -1;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 20px;
    }
    
    .logo-container {
        top: 15px;
        left: 15px;
    }
    
    .logo {
        height: 28px;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .extract-btn,
    .generate-btn {
        width: 100%;
    }
}
