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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    touch-action: pan-y pinch-zoom;
}

/* Dark Mode (Default) */
body.dark-mode {
    background: #0a0c0f;
    color: #ffffff;
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 255, 136, 0.03) 0%, transparent 20%);
}

/* Light Mode */
body.light-mode {
    background: #f0f2f5;
    color: #1a1e24;
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 150, 255, 0.05) 0%, transparent 20%);
}

body.light-mode .portfolio-container,
body.light-mode .dashboard-container,
body.light-mode .results-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Theme Toggle */
.theme-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #00ff88;
    color: inherit;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.dark-mode .theme-toggle {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

.light-mode .theme-toggle {
    background: rgba(0, 150, 255, 0.1);
    border-color: #0096ff;
    color: #0096ff;
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.light-icon, .dark-icon {
    font-size: 18px;
}

.dark-mode .light-icon {
    display: none;
}

.light-mode .dark-icon {
    display: none;
}

/* Intro Page */
.intro-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.intro-logo img {
    width: 150px;
    height: 150px;
    animation: pulse 2s infinite;
    margin-bottom: 30px;
}

.intro-text h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.loading-dots {
    font-size: 4rem;
    line-height: 1;
    margin: 20px 0;
}

.loading-dots span {
    animation: dots 1.5s infinite;
    opacity: 0;
    display: inline-block;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.5s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 1s;
}

@keyframes dots {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-10px); }
}

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

.loading-text {
    color: #888;
    font-size: 1rem;
    letter-spacing: 2px;
}

/* Portfolio Page */
.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 50px;
}

.logo-small {
    margin-bottom: 20px;
}

.portfolio-header h1 {
    font-size: 3rem;
    background: linear-gradient(45deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.2rem;
    color: #888;
}

.portfolio-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.portfolio-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.1);
}

.portfolio-description h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #00ff88;
}

.light-mode .portfolio-description h2 {
    color: #0096ff;
}

.feature-list {
    list-style: none;
    margin: 30px 0;
}

.feature-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
}

.light-mode .feature-list li {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.continue-btn {
    background: #00ff88;
    color: #0a0c0f;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    margin-top: 20px;
}

.light-mode .continue-btn {
    background: #0096ff;
    color: white;
}

.continue-btn:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
}

/* Dashboard Page */
.dashboard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 50px;
}

.logo-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo-banner h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-subtitle {
    color: #888;
    font-size: 1.1rem;
}

.search-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.light-mode .search-container {
    background: rgba(0, 0, 0, 0.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    padding: 5px 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.light-mode .input-wrapper {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
}

.prefix-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 0;
    font-size: 1.2rem;
    color: inherit;
    outline: none;
}

.input-wrapper input::placeholder {
    color: #666;
}

.scan-btn {
    width: 100%;
    background: #00ff88;
    color: #0a0c0f;
    border: none;
    padding: 15px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.light-mode .scan-btn {
    background: #0096ff;
    color: white;
}

.scan-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
}

.info-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.info-panel h3 {
    margin-bottom: 20px;
    color: #00ff88;
}

.light-mode .info-panel h3 {
    color: #0096ff;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.info-item {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    text-align: center;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.light-mode .info-item {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.loading-content {
    text-align: center;
}

.scanning-text {
    font-size: 2rem;
    color: #00ff88;
    margin-bottom: 30px;
    letter-spacing: 5px;
    animation: glow 1.5s infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 10px #00ff88; }
    50% { text-shadow: 0 0 30px #00ff88; }
}

.loading-dots-large {
    font-size: 6rem;
    line-height: 1;
    margin: 30px 0;
    color: #00ff88;
}

.loading-dots-large span {
    animation: dotsLarge 1.5s infinite;
    opacity: 0;
    display: inline-block;
}

.loading-dots-large span:nth-child(2) {
    animation-delay: 0.5s;
}

.loading-dots-large span:nth-child(3) {
    animation-delay: 1s;
}

@keyframes dotsLarge {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-20px); }
}

/* Results Page */
.results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.back-btn {
    background: transparent;
    border: 1px solid #00ff88;
    color: #00ff88;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.light-mode .back-btn {
    border-color: #0096ff;
    color: #0096ff;
}

.back-btn:hover {
    background: #00ff88;
    color: #0a0c0f;
}

.phone-display {
    background: rgba(0, 255, 136, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid #00ff88;
}

.scanned-number-label {
    color: #888;
    margin-right: 10px;
}

.scanned-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ff88;
    letter-spacing: 2px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.light-mode .result-card {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.result-card h4 {
    color: #00ff88;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.light-mode .result-card h4 {
    color: #0096ff;
}

.result-card .value {
    font-size: 1.3rem;
    font-weight: bold;
    word-break: break-word;
}

.result-card .sub-value {
    color: #888;
    font-size: 0.9rem;
    margin-top: 5px;
}

.country-flag {
    font-size: 2rem;
    margin-right: 10px;
}

.map-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    margin-top: 30px;
}

.map-container h3 {
    color: #00ff88;
    margin-bottom: 20px;
}

.light-mode .map-container h3 {
    color: #0096ff;
}

.map {
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #00ff88;
}

.light-mode .map {
    border-color: #0096ff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .portfolio-content {
        grid-template-columns: 1fr;
    }
    
    .portfolio-header h1 {
        font-size: 2rem;
    }
    
    .logo-banner h1 {
        font-size: 1.8rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .map {
        height: 300px;
    }
    
    .theme-toggle {
        padding: 8px 15px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .scanned-number {
        font-size: 1.1rem;
    }
}
